import App from './App'
import { createSSRApp } from 'vue'
import * as Pinia from 'pinia';
import file from '@/utils/file/index.js'
import uvUI from '@/uni_modules/uv-ui-tools';
import allMixin from '@/assets/js/allMixin.js';

export function createApp() {
	const app = createSSRApp(App);
	app.use(Pinia.createPinia());
	app.use(uvUI, { mpShare: true });
	app.mixin(allMixin);

	app.config.globalProperties.$furl = file.getFileUrl;
	app.config.globalProperties.$surl = file.getStaticUrl;

	return {
		app,
		Pinia,
	}
}